package com.example.param.model;

/**
 * 封装分页参数 + 搜索条件
 */
public class UserQuery {
    private int pageNum = 1;
    private int pageSize = 5;
    private String name;    // 模糊搜索
    private String status;  // 启用/禁用
    private String sortBy;  // 排序字段（如 age）
    private String order;   // 排序方向 asc/desc

    // Getters and Setters ...

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSortBy() {
        return sortBy;
    }

    public void setSortBy(String sortBy) {
        this.sortBy = sortBy;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    @Override
    public String toString() {
        return "UserQuery{" +
                "pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", name='" + name + '\'' +
                ", status='" + status + '\'' +
                ", sortBy='" + sortBy + '\'' +
                ", order='" + order + '\'' +
                '}';
    }
}